import {defineStore} from 'pinia'
import {randomColor} from "@utils/color-util";
import router from '@router/index'

export const useRouterConfig = defineStore('routerConfig', () => {
    function permissionRoutes() {
        const routes = router.routes
        routes.forEach(item => {
            item['color'] = randomColor()
        })
        return routes
    }

    return {permissionRoutes}
})
